{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "871808c0-07e3-4260-bf07-d1159f52d2b9",
   "metadata": {},
   "source": [
    "# Exercise 1"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d65a1192-55fe-45bc-b2af-5bda0ed0afd7",
   "metadata": {},
   "source": [
    "## Question 1 ##\n",
    "Use scipy.stats.norm to generate 20 arrays, each containing 200 independent, identically distributed, normal random variables. Calculate and print the mean and the standard deviation of the samples in each of these arrays."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d08860fe-2dd5-4049-8b8f-67b568fb04e6",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from scipy.stats import norm\n",
    "N = 200\n",
    "K = 20\n",
    "\n",
    "# Your code goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "103aa1a3-ac8e-447a-b82e-b8564594ec51",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "7f4681cd-0895-4fd2-b6f0-3e37e1dac44f",
   "metadata": {},
   "source": [
    "## Question 2 ##\n",
    "Perform the Student's t-test on each of these samples with the null hypothesis\n",
    "  \n",
    "$H_0$: The sample comes from a distribution of 0 mean.\n",
    "\n",
    "\n",
    "Calculate the p-value of these tests. If we reject $H_0$ when the p-value is less than 5%, in how many cases will we reject $H_0$?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "29060bec-7fe2-4bd7-9279-f8241f074bd1",
   "metadata": {},
   "outputs": [],
   "source": [
    "from scipy.stats import t as Students_t\n",
    "# your code goes here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d580d75a-8027-4d1a-a4bb-2d5b140a2412",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
